<?php

/**
 * Created by PhpStorm.
 * User: 彭奇
 * Date: 2018/9/21
 * Time: 16:19
 */
class student
{
   public $name;
   public $sex;
   public $age;
   static $students=0;
   const a=2;
   function __construct()
   {
       echo $this->name."加入PHP，当前有个学生";
       self::$students++;
   }
   function __destruct()
   {
       // TODO: Implement __destruct() method.
   }
   function js()
   {
       echo "我是".$this->name.",".$this->age."岁,".$this->sex."      "."当前有".self::$students."个学生";
   }
}